### Input Elements

- <input> tag supported - The input tag specifies a point where the user is prompted to enter text.

Attribute | Value | Description | Comments
--- | --- | --- | ---
accesskey | 1,2,3,4,5,6,7,8,9,0,*,# | A Dialpad button used to access a link containing selections. If the element is a Radio button, pressing the access key is a shortcut for selecting the Radio button. If the element is a check box, pressing the access key is a shortcut to check or uncheck the box. If the element is a Submit or Reset button, pressing the access key is a shortcut for pressing that button. For example, pressing a Submit button’s access key submits the applicable form. | NOT SUPPORTED.
name | nmtoken | REQUIRED. The name of the variable that is set with the result of the user's input. | SUPPORTED.
emptyok | true false | Sets whether the user can leave the input field blank or not. Default is “true.” | SUPPORTED.
format | A a N X x M m *f nf | Sets the data format for the input field. Default is “M.” A = uppercase alphabetic or punctuation characters a = lowercase alphabetic or punctuation characters N = numeric characters X = uppercase characters x = lowercase characters M = any character, but is treated as uppercase for data entry m = any character, but is treated as lowercase for data entry *f = Any number of characters. Replace the f with one of the letters above to specify what characters the user can enter. nf = Replace the n with a number from 1 to 9 to specify the number of characters the user can enter. Replace the f with one of the letters above to specify what characters the user can enter. The user cannot exit the input box unless the correct number or type of characters is entered. The user does not receive an error message if incorrect data is entered. | SUPPORTED.
ivalue |  | The attribute value takes precedence over ivalue. | SUPPORTED.
maxlength | number | Sets the maximum number of characters the user can enter in the field. If the number of characters entered exceeds this value, display “Maxlength reached” on the Prompt Line. | SUPPORTED.
size | number_of_char | Sets the width of the input field. | NOT SUPPORTED.
tabindex | number | Sets the tabbing position for the input field. | NOT SUPPORTED.
title | cdata | Sets a title for the input field. | SUPPORTED.
type | text password | Indicates the type of the input field. The default value is “text.” | SUPPORTED.
value | cdata | Sets the default value of the variable in the name attribute. | SUPPORTED.
style | property | Cascading style sheet attribute. | SUPPORTED.

The input tag causes an automatic line break before and after input text.

Only one input tag can exist per display line.

When a user views a page with the input tag specified, the first thing that shows up in the Top Line is the card title, if specified. When the user scrolls to the first line containing input, the Top Line shows the input box title if specified, otherwise the card title is shown. The Top Line displays the card title for all non-input text.

When the input box is selected, a vertical line (the “cursor”) appears at the left side of the input box.

The attribute type password should only be used when it is important to not display the user' s password on the screen. Asterisks are displayed instead. It is also important that the password not be cached.

The phrase [enter text here] appears for all input tags if the value attribute is null. If the author specifies a non-null content in the value attribute, that content displays between brackets for that input tag.

Only the correct size, type, and number of characters are accepted in to the input box. For example, if alpha text is specified and the user types in a symbol or numeric text, the user input is not accepted. The screen repaints and the user has to re-enter the text. If the wrong kind of text is typed, the user receives an error tone. If the “n” (number) value is specified and the user types in the incorrect number of characters, that input is rejected.

See Text Elements for other text entry guidelines.

- <fieldset> tag - The fieldset tag is used to group logically related elements in a card. This tag is not supported.
- <optgroup> tag - Sets of <optgroup> brackets can be put around <options> in a <select> list. The results break a list into sublists.

Attribute | Value | Description | Comments
--- | --- | --- | ---
title | cdata | Sets a title for the optgroup element. | SUPPORTED.
style | property | Cascading style sheet attribute. | SUPPORTED.

- <option> tag - A set of option tags is needed to specify each individual item in a list. This tag must be used with the select tag.

Attribute | Value | Description | Comments
--- | --- | --- | ---
onpick | url | Sets what is going to happen when a user selects an item. | SUPPORTED.
title | cdata | Sets a title for the option | SUPPORTED.
value | cdata | Sets the value to use when setting the “name” variable in the select element. | SUPPORTED.
style | property | Cascading style sheet attribute. | SUPPORTED

The following can occur:

- If an onpick attribute is specified, the user simply presses the associated Line button to go to that specified URL.
- If no onpick is specified, the user must choose and use the select (Do tag) softkey. Pressing the Line button checks the option if a radio button is specified, or checks/unchecks a specified check box. If there is a radio box and multiple=”false” value in the <select> tag), clicking on the Line button keeps the radio button checked.
- A WML page will not specify both a do type (select softkey) and onpick on the same page. Either the do type or onpick specifies the URL of the next card.

Line buttons toggle the state. When the Line button is initially pressed, a choice is selected. Pressing the same Line button again deselects the choice. However, this is not always true. If the option corresponds to a check box (multiple=”true” value in the <select> tag) it is true.

If an onpick attribute is defined for an <option> tag and the <option> tag also has an <onevent> tag defined, the onpick attribute will supersede the onevent binding.

- <select> tag - The select tag allows for the definition of a list, embedded in a card. This tag allows the user to choose inputs from a list rather than having to type a value. The select tag must be used with the option tag.

Attribute | Value | Description | Comments
--- | --- | --- | ---
name | nmtoken | REQUIRED. String that names the variable to which the selection results are assigned. | SUPPORTED.
ivalue | cdata | Sets the pre-selected option element. If none is specified, the first item in a list is automatically selected. | SUPPORTED.
multiple | true false | Sets whether multiple items can be selected. Default is “false.” False is used for a single selection. | SUPPORTED.
tabindex | number | Sets the tabbing position for the select element. | NOT SUPPORTED.
title | cdata | Sets a title for the list. | SUPPORTED.
value | cdata | Sets the default value of the variable in the name attribute. | SUPPORTED.
style | property | Cascading style sheet attribute. | SUPPORTED.
iname | index | This optional attribute specifies the name of the variable that will be assigned the value of the index result. The index result is the position of the selected item in the select list. If multiple selections are permitted, the index result is a semicolon-delimited list of the indices. The indexing starts at one. A zero signifies that no selection has been made. | SUPPORTED.

Option tags are nested within select tags to determine the number of multiple-choice selections.

The following defines the graphic template for rendering single and multiple-choice selections:

- Single selection - a modified radio box is rendered as follows for single selection of multiple choices:

- a complete empty circle indicates that the user did not select this item.
- a complete empty circle with a black round dot in the center of the circle indicates the user choice.

- Multiple selection - a check box is rendered as follows for multiple selections of multiple choices:

- an empty check box indicates that the user did not select this item.
- a check box with an X centered in the box indicates the user choice.